package com.syj.core.result;

import java.util.HashMap;

/**
 * @author rankai
 *         createTime 2017-02-2017/2/8 14:01
 */
public class ReturnData extends HashMap<String, Object> {

    private static final String CODE = "code";
    private static final String MSG = "msg";
    private static final String DATA = "data";


    public ReturnData() {
        this.put(CODE, 200);
        this.put(MSG, "成功");
    }

    public ReturnData(Integer code) {
        this.put(CODE, code);
    }

    public ReturnData setMsg(String message) {
        this.put(MSG, message);
        return this;
    }

    public ReturnData setData(Object object) {
        this.put(DATA, object);
        return this;
    }
}
